package com.dodo.blog.server.impl.it;

import com.comvai.services.gae.CommonServicesGaeModule;
import com.comvai.test.gae.ServiceConfigModule;
import com.dodo.blog.server.impl.BlogModule;
import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
import com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig;

/**
 * @author <a href="mailto:pohorelec@comvai.com">Aurel Medvegy</a>
 */
public class ServicesEnvironment
        extends ServiceConfigModule
{
    public ServicesEnvironment()
    {
        construct( new LocalServiceTestHelper( new LocalDatastoreServiceTestConfig(),
                new LocalTaskQueueTestConfig().setQueueXmlPath( "src/main/webapp/WEB-INF/queue.xml" ) ) );
    }

    @Override
    public void configureTestBinder()
    {
        install( new BlogModule() );
        install( new CommonServicesGaeModule() );
    }
}